<template>
  <div>
    <!-- 案件修饰符:监听用户按下指定按键后触发 -->
    <!-- .enter 用户按下回车 -->
    <!-- .esc   用户按下esc -->
    <!-- .enter 修饰符后,fn函数只有在用户按下回车时才触发  -->
    <input @keydown.enter="fn" type="text" />
    <input @keydown.delete="fn2" type="text" />
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },

  methods: {
    fn() {
      console.log("芜湖");
    },
    fn2() {},
  },
};
</script>

<style>
</style>